package com.traffic.service.impl;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.traffic.constant.Status;

import com.traffic.entity.Leaderboardpre;

import com.traffic.exception.BaseException;


import com.traffic.mapper.LeaderboardpreMapper;
import com.traffic.service.LeaderboardpreService;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;


@Service
public class LeaderoardpreServiceImpl extends ServiceImpl<LeaderboardpreMapper,Leaderboardpre> implements LeaderboardpreService{

    @Autowired
    LeaderboardpreMapper leaderboardpreMapper;

    @Override
    public Object queryTypeRank(String type, Long userid) {
        QueryWrapper<Leaderboardpre> wrapper = new QueryWrapper<>();
        Object myrank = leaderboardpreMapper.selectObjs(wrapper.select("user_id").eq(type,userid));
        return myrank;
    }
}
